Relationship between Cartesian and Spherical coordinate system